<?php
// +----------------------------------------------------------------------
// | snake
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2022 http://baiyf.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: NickBai <1902822973@qq.com>
// +----------------------------------------------------------------------
namespace app\common\model;

use think\Model;

class Category extends BaseModel
{
    public function getTableFieldsComment(){
        return [
            [
                $this->commentFieldName => '{"disc":"序号","name":"id","explain":"","type":"hidden","sort":0,"type_value_custom":null,"type_value":[],"show":{"list":{"checked":false,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"","op":"=","is_tree":false}}'
            ],
            [
                $this->commentFieldName => '{"disc":"所属上级","name":"parent_id","explain":"编辑时请勿选择自己的下级","type":"select_empty","sort":"3","type_value_custom":{"table":"Category","id":"id","text":"cat_name","f":"","source":"","is_tree":true,"tree_parent_id_name":"parent_id"},"type_value":[],"show":{"list":{"checked":true,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":true,"search":{"text":"所属上级","op":"=","is_tree":true,"tree_parent_id_name":"parent_id"}}'
            ],
            [
                $this->commentFieldName => '{"disc":"栏目名称","name":"cat_name","type":"text","sort":"2","type_value_custom":{"table":"Category","id":"id","text":"cat_name","f":"","source":""},"type_value":[],"show":{"list":{"checked":true,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":true,"search":{"text":"栏目名称","op":"LIKE","is_tree":false,"tree_parent_id_name":""}}'
            ],
            [
                $this->commentFieldName => '{"disc":"栏目图片","name":"image_url","type":"image_select","type_value_custom":null,"type_value":[],"show":{"list":{"checked":false,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"","op":"="}}'
            ],
            [
                $this->commentFieldName => '{"disc":"栏目描述","name":"description","type":"textarea","type_value_custom":null,"type_value":[],"show":{"list":{"checked":false,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"栏目名称","op":"LIKE"}}'
            ],
            [
                $this->commentFieldName => '{"disc":"链接地址","name":"url","type":"text","type_value_custom":null,"type_value":[],"show":{"list":{"checked":false,"cv":""},"add":{"checked":true,"cv":""},"edit":{"checked":true,"cv":""},"view":{"checked":true,"cv":""}},"validate":{"require":false},"isSearch":false,"search":{"text":"栏目名称","op":"LIKE"}}'
            ],
        ];
    }

    public function getTableComment(){
        return '';
    }
}